// const http = require('http');

// function createServer() {
//   const server = http.createServer((req, res) => {
//     res.end('1');
//   });
//   server.on('clientError', (err, socket) => {
//     socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
//   });
//   server.listen(9000);
//   console.log('http://127.0.0.1:9000')
// }

// createServer()

const child_process = require('child_process');

var workerProcess1 = child_process.exec('yarn start');
workerProcess1.stdout.on('data', function (data) {
  console.log('stdout1: ' + data);
});
var workerProcess2 = child_process.spawn('node', ['s2.js', '1111']);
workerProcess2.stdout.on('data', function (data) {
  console.log('stdout2: ' + data);
});
